using UnityEngine;

namespace Crosstales.Common.Util
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.Common.Util.BaseHelper
    public abstract class BaseHelper
    {
        
        #region Crosstales.Common.Util.BaseHelper.<>c
        // [Assembly-CSharp-firstpass.dll].Crosstales.Common.Util.BaseHelper.<>c
        [Serializable]
        private sealed class __c
        {
            // Fields
            public static readonly Crosstales.Common.Util.BaseHelper.<>c __9;
            public static System.Func<System.Reflection.Assembly, System.Collections.Generic.IEnumerable<System.Type>> __9__65_0;
            
            // Methods
            private static __c()
            {
                object val_1 = 536897641;
                val_1 = new System.Object();
                mem2[0] = val_1;
                throw new NullReferenceException();
            }
            public __c()
            {
            
            }
            internal System.Collections.Generic.IEnumerable<System.Type> <InvokeMethod>b__65_0(System.Reflection.Assembly assembly)
            {
                goto typeof(System.Reflection.Assembly).__il2cppRuntimeField_238;
            }
        
        }
        
        #endregion
        
        // Fields
        public static readonly System.Globalization.CultureInfo BaseCulture;
        protected static readonly System.Random rnd;
        public static bool ApplicationIsPlaying;
        private static string[] args;
        private static int androidAPILevel;
        
        // Properties
        public static bool isWindowsPlatform { get; }
        public static bool isMacOSPlatform { get; }
        public static bool isLinuxPlatform { get; }
        public static bool isStandalonePlatform { get; }
        public static bool isAndroidPlatform { get; }
        public static bool isIOSPlatform { get; }
        public static bool isTvOSPlatform { get; }
        public static bool isWSAPlatform { get; }
        public static bool isXboxOnePlatform { get; }
        public static bool isPS4Platform { get; }
        public static bool isWebGLPlatform { get; }
        public static bool isWebPlatform { get; }
        public static bool isWindowsBasedPlatform { get; }
        public static bool isWSABasedPlatform { get; }
        public static bool isAppleBasedPlatform { get; }
        public static bool isIOSBasedPlatform { get; }
        public static bool isMobilePlatform { get; }
        public static bool isEditor { get; }
        public static bool isWindowsEditor { get; }
        public static bool isMacOSEditor { get; }
        public static bool isLinuxEditor { get; }
        public static bool isEditorMode { get; }
        public static bool isIL2CPP { get; }
        public static Crosstales.Common.Model.Enum.Platform CurrentPlatform { get; }
        public static int AndroidAPILevel { get; }
        
        // Methods
        public static bool get_isWindowsPlatform()
        {
            return false;
        }
        public static bool get_isMacOSPlatform()
        {
            return false;
        }
        public static bool get_isLinuxPlatform()
        {
            return false;
        }
        public static bool get_isStandalonePlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isAndroidPlatform()
        {
            return true;
        }
        public static bool get_isIOSPlatform()
        {
            return false;
        }
        public static bool get_isTvOSPlatform()
        {
            return false;
        }
        public static bool get_isWSAPlatform()
        {
            return false;
        }
        public static bool get_isXboxOnePlatform()
        {
            return false;
        }
        public static bool get_isPS4Platform()
        {
            return false;
        }
        public static bool get_isWebGLPlatform()
        {
            return false;
        }
        public static bool get_isWebPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isWindowsBasedPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isWSABasedPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isAppleBasedPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isIOSBasedPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isMobilePlatform()
        {
            if(mem[536883133] != 0)
            {
                    return true;
            }
            
            return true;
        }
        public static bool get_isEditor()
        {
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            if(mem[536883133] != 0)
            {
                    return false;
            }
            
            return false;
        }
        public static bool get_isWindowsEditor()
        {
            return false;
        }
        public static bool get_isMacOSEditor()
        {
            return false;
        }
        public static bool get_isLinuxEditor()
        {
            return false;
        }
        public static bool get_isEditorMode()
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditor;
            return false;
        }
        public static bool get_isIL2CPP()
        {
            return true;
        }
        public static Crosstales.Common.Model.Enum.Platform get_CurrentPlatform()
        {
            if(mem[536883133] != 0)
            {
                    return 4;
            }
            
            if(mem[536883133] != 0)
            {
                    return 4;
            }
            
            if(mem[536883133] != 0)
            {
                    return 4;
            }
            
            if(mem[536883133] != 0)
            {
                    return 4;
            }
            
            return 4;
        }
        public static int get_AndroidAPILevel()
        {
            var val_6 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_6 = 536882909;
            }
            
            if((mem[536883093] + 32) == 0)
            {
                    string val_6 = -1610611695;
                val_6 = (UnityEngine.SystemInfo.operatingSystem.IndexOf(value:  val_6)) + 1;
                val_6 = 536882909;
                if(mem[536883133] == 0)
            {
                    val_6 = 536882909;
            }
            
                mem2[0] = System.Int32.Parse(s:  UnityEngine.SystemInfo.operatingSystem.Substring(startIndex:  val_6, length:  3));
            }
            
            if(mem[536883133] != 0)
            {
                    return (int)mem[536883093] + 32;
            }
            
            val_6 = 536882909;
            return (int)mem[536883093] + 32;
        }
        private static BaseHelper()
        {
            System.Globalization.CultureInfo val_3 = 536884503;
            val_3 = new System.Globalization.CultureInfo(name:  Crosstales.Common.Util.BaseHelper.LanguageToISO639(language:  UnityEngine.Application.systemLanguage));
            mem2[0] = val_3;
            System.Random val_4 = 536891173;
            val_4 = new System.Random();
            mem2[0] = val_4;
            mem2[0] = 0;
            mem2[0] = UnityEngine.Application.isPlaying;
            mem2[0] = 0;
            Crosstales.Common.Util.BaseHelper.initialize();
        }
        private static void initialize()
        {
            if(mem[536883133] == 0)
            {
                    536882909 = 536882909;
            }
            
            mem2[0] = UnityEngine.Application.isPlaying;
        }
        public static string CreateString(string replaceChars, int stringLength)
        {
            var val_3;
            if(replaceChars == null)
            {
                    return (string)mem[536893213];
            }
            
            if(replaceChars._stringLength < 2)
            {
                    if(replaceChars._stringLength != 1)
            {
                    return (string)mem[536893213];
            }
            
                return 0.CreateString(c:  replaceChars.Chars[0], count:  stringLength);
            }
            
            if(stringLength < 1)
            {
                    return 0.CreateString(val:  536881013);
            }
            
            var val_3 = 0;
            label_9:
            val_3 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_3 = 536882909;
            }
            
            if(val_3 >= mem[536881037])
            {
                goto label_8;
            }
            
            mem[536881045] = replaceChars.Chars[mem[536883093] + 8];
            val_3 = val_3 + 1;
            if(stringLength != val_3)
            {
                goto label_9;
            }
            
            return 0.CreateString(val:  536881013);
            label_8:
        }
        public static System.Collections.Generic.List<string> SplitStringToLines(string text, bool ignoreCommentedLines = True, int skipHeaderLines = 0, int skipFooterLines = 0)
        {
            var val_11;
            string val_12;
            var val_13;
            var val_14;
            val_11 = skipFooterLines;
            val_12 = text;
            System.Collections.Generic.List<System.Object> val_1 = 536877495;
            val_1 = new System.Collections.Generic.List<System.Object>(capacity:  100);
            if((System.String.IsNullOrEmpty(value:  val_12)) != false)
            {
                    val_11 = 27510904;
                UnityEngine.Debug.LogWarning(message:  -1610604585);
                return (System.Collections.Generic.List<System.String>)val_1;
            }
            
            val_13 = 536882899;
            if(mem[536883123] == 0)
            {
                    val_13 = 536882899;
            }
            
            Unknown val_11 = val_3.Length;
            val_12 = mem[536883083].Split(input:  val_12);
            if(val_11 < 1)
            {
                    return (System.Collections.Generic.List<System.String>)val_1;
            }
            
            val_11 = val_11 & 4294967295;
            label_25:
            if((1 <= skipHeaderLines) || (0 >= ((long)val_11 - val_11)))
            {
                goto label_23;
            }
            
            if(0 >= val_11)
            {
                    throw new NullReferenceException();
            }
            
            if((System.String.IsNullOrEmpty(value:  null)) == true)
            {
                goto label_23;
            }
            
            if(0 >= val_3.Length)
            {
                    throw new NullReferenceException();
            }
            
            if(ignoreCommentedLines == false)
            {
                goto label_14;
            }
            
            if((Crosstales.ExtensionMethods.CTStartsWith(str:  1152921504930980496, toCheck:  -1610612299, comp:  5)) == true)
            {
                goto label_23;
            }
            
            if(0 >= val_3.Length)
            {
                    throw new NullReferenceException();
            }
            
            var val_12 = mem[536877523];
            val_12 = val_12 + 1;
            mem[536877523] = val_12;
            if(mem[536877519] >= (mem[536877511] + 24))
            {
                goto label_19;
            }
            
            var val_8 = mem[536877511] + ((mem[536877519]) << 3);
            mem[536877519] = mem[536877519] + 1;
            mem2[0] = null;
            goto label_23;
            label_14:
            var val_13 = mem[536877523];
            val_13 = val_13 + 1;
            mem[536877523] = val_13;
            if(mem[536877519] >= (mem[536877511] + 24))
            {
                goto label_22;
            }
            
            var val_10 = mem[536877511] + (((mem[536877519] + 1)) << 3);
            mem[536877519] = mem[536877519] + 1;
            mem2[0] = null;
            goto label_23;
            label_22:
            val_14 = mem[3221290799];
            goto label_24;
            label_19:
            val_14 = mem[3221290799];
            label_24:
            label_23:
            if(1 < (val_3.Length << ))
            {
                goto label_25;
            }
            
            return (System.Collections.Generic.List<System.String>)val_1;
        }
        public static string FormatBytesToHRF(long bytes, bool useSI = False)
        {
            int val_13;
            long val_14;
            var val_15;
            var val_16;
            var val_17;
            var val_18;
            object val_19;
            object val_20;
            string val_21;
            val_13 = useSI;
            val_14 = bytes;
            val_15 = 27479264;
            val_16 = 27538536;
            if(val_13 == false)
            {
                goto label_1;
            }
            
            if((val_14 + 999) < 1999)
            {
                goto label_8;
            }
            
            if((val_14 + 999949) >= 1999899)
            {
                goto label_3;
            }
            
            val_13 = 0;
            goto label_4;
            label_1:
            if(val_14 != (-9223372036854775808))
            {
                goto label_5;
            }
            
            val_17 = -9223372036854775808;
            goto label_6;
            label_5:
            var val_3 = (val_14 < 0) ? (-val_14) : (val_14);
            if(val_3 < 1024)
            {
                goto label_8;
            }
            
            label_6:
            val_15 = 27549992;
            val_13 = 0;
            val_18 = val_3;
            label_10:
            if(val_3 <= 0)
            {
                goto label_9;
            }
            
            val_18 = val_18 >> 10;
            val_13 = val_13 + 1;
            if((40 - 10) != 10)
            {
                goto label_10;
            }
            
            val_13 = 5;
            label_9:
            var val_13 = (long)System.Math.Sign(value:  val_14);
            val_13 = val_18 * val_13;
            float val_14 = (float)val_13;
            val_14 = val_14 * 0.0009765625f;
            val_19 = 536892547;
            char val_6 = -1610597671.Chars[5];
            val_20 = 536883661;
            val_21 = -1610594807;
            return (string)System.String.Format(format:  val_21 = -1610594809, arg0:  val_19 = 536892547, arg1:  val_20 = 536883661);
            label_8:
            string val_8 = bytes.ToString() + -1610612501(-1610612501);
            return (string)System.String.Format(format:  val_21, arg0:  val_19, arg1:  val_20);
            label_3:
            do
            {
                val_14 = (X11 >> 7) + ((X11) >> 63);
                val_13 = 0 + 1;
            }
            while((val_14 + 999949999) > 1999899998);
            
            label_4:
            float val_15 = (float)val_14;
            val_15 = val_15 / 1000f;
            val_16 = 27549984;
            char val_11 = -1610597671.Chars[val_13];
            return (string)System.String.Format(format:  val_21, arg0:  val_19, arg1:  val_20);
        }
        public static string FormatSecondsToHRF(double seconds)
        {
            var val_18;
            int val_19;
            object val_20;
            int val_17 = (int)seconds;
            val_18 = 2290614272;
            val_18 = 34952;
            var val_1 = (seconds == Infinity) ? -2147483648 : (val_17);
            val_17 = val_17 >> 32;
            val_19 = 27349520;
            val_17 = val_17 + val_1;
            val_17 = (val_17 >> 5) + (val_17 >> 31);
            double val_3 = val_1 - (val_17 * 60);
            if(seconds >= 86400)
            {
                goto label_1;
            }
            
            if(seconds >= 3600)
            {
                goto label_2;
            }
            
            val_20 = 536888099;
            string val_5 = System.String.Format(format:  -1610594681, arg0:  val_20, arg1:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_3));
            return (string)System.String.Format(format:  -1610594675, arg0:  val_20 = 536888099, arg1:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_23 + (val_22 >> 31)), arg2:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_3));
            label_1:
            var val_18 = 0;
            var val_6 = val_18 + val_1;
            val_18 = val_6 >> 16;
            var val_7 = val_18 + (val_6 >> 31);
            val_20 = 536881345;
            if(mem[536881369] == 0)
            {
                    throw new ArrayTypeMismatchException();
            }
            
            val_1 = val_1 + (val_7 * 4294880896);
            var val_19 = 0;
            val_19 = val_19 + val_1;
            var val_8 = val_19 >> 11;
            mem[536881377] = 536888099;
            val_7 = val_8 + (val_19 >> 31);
            if(mem[536881369] <= 1)
            {
                    throw new ArrayTypeMismatchException();
            }
            
            var val_20 = 3599;
            val_20 = val_1 + (val_7 * val_20);
            val_8 = val_8 >> 32;
            val_20 = val_8 + val_20;
            val_8 = val_20 >> 5;
            mem[536881385] = 536888099;
            val_19 = val_8 + (val_20 >> 31);
            if(mem[536881369] <= 2)
            {
                    throw new ArrayTypeMismatchException();
            }
            
            mem[536881393] = Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_19);
            if(mem[536881369] <= 3)
            {
                    throw new ArrayTypeMismatchException();
            }
            
            mem[536881401] = Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_3);
            string val_11 = System.String.Format(format:  -1610594659, args:  val_20);
            return (string)System.String.Format(format:  -1610594675, arg0:  val_20, arg1:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_23 + (val_22 >> 31)), arg2:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_3));
            label_2:
            var val_21 = 0;
            val_21 = val_21 + val_1;
            val_21 = (val_21 >> 11) + (val_21 >> 31);
            var val_22 = 3599;
            val_22 = val_1 + (val_21 * val_22);
            val_18 = 27550520;
            var val_23 = 0;
            val_22 = val_23 + val_22;
            val_23 = val_22 >> 5;
            return (string)System.String.Format(format:  -1610594675, arg0:  val_20, arg1:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_23 + (val_22 >> 31)), arg2:  Crosstales.Common.Util.BaseHelper.addLeadingZero(value:  val_3));
        }
        public static UnityEngine.Color HSVToRGB(float h, float s, float v, float a = 1)
        {
            if(s < 0)
            {
                    return new UnityEngine.Color() {r = v, g = v, b = v, a = a};
            }
            
            float val_6 = h;
            val_6 = val_6 / 60f;
            float val_8 = 1f;
            s = val_8 - s;
            var val_1 = (s == Infinityf) ? -2147483648 : 1114636288;
            float val_2 = s * v;
            float val_7 = (float)val_1;
            val_7 = val_6 - val_7;
            float val_3 = val_7 * s;
            val_3 = val_8 - val_3;
            val_3 = val_3 * v;
            if(val_1 > 4)
            {
                    return new UnityEngine.Color() {r = v, g = v, b = v, a = a};
            }
            
            val_7 = val_8 - val_7;
            val_7 = val_7 * s;
            val_8 = val_8 - val_7;
            float val_4 = val_8 * v;
            var val_5 = 6554128 + ((20182992 + s == Infinityf ? 2147483648 : 1114636288) << 2);
            goto (6554128 + (20182992 + s == Infinityf ? 2147483648 : 1114636288) << 2);
        }
        public static string GenerateLoremIpsum(int length, int minSentences = 1, int maxSentences = 2147483647, int minWords = 1, int maxWords = 15)
        {
            string val_16;
            var val_17;
            var val_18;
            var val_19;
            var val_20;
            var val_21;
            var val_22;
            var val_23;
            var val_24;
            var val_25;
            var val_26;
            var val_27;
            var val_28;
            var val_29;
            var val_30;
            var val_31;
            var val_32;
            var val_33;
            var val_34;
            var val_35;
            var val_36;
            var val_37;
            var val_38;
            string val_39;
            int val_40;
            var val_41;
            var val_42;
            var val_43;
            val_16 = minWords;
            if((-1610597403) != 0)
            {
                    val_17 = -1610597403;
            }
            else
            {
                    val_17 = 0;
            }
            
            if(mem[536881491] == 0)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881499] = val_17;
            if((-1610597869) != 0)
            {
                    val_18 = -1610597869;
            }
            else
            {
                    val_18 = 0;
            }
            
            if(mem[536881491] <= 1)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881507] = val_18;
            if((-1610599173) != 0)
            {
                    val_19 = -1610599173;
            }
            else
            {
                    val_19 = 0;
            }
            
            if(mem[536881491] <= 2)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881515] = val_19;
            if((-1610596167) != 0)
            {
                    val_20 = -1610596167;
            }
            else
            {
                    val_20 = 0;
            }
            
            if(mem[536881491] <= 3)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881523] = val_20;
            if((-1610600329) != 0)
            {
                    val_21 = -1610600329;
            }
            else
            {
                    val_21 = 0;
            }
            
            if(mem[536881491] <= 4)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881531] = val_21;
            if((-1610599653) != 0)
            {
                    val_22 = -1610599653;
            }
            else
            {
                    val_22 = 0;
            }
            
            if(mem[536881491] <= 5)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881539] = val_22;
            if((-1610600375) != 0)
            {
                    val_23 = -1610600375;
            }
            else
            {
                    val_23 = 0;
            }
            
            if(mem[536881491] <= 6)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881547] = val_23;
            if((-1610598995) != 0)
            {
                    val_24 = -1610598995;
            }
            else
            {
                    val_24 = 0;
            }
            
            if(mem[536881491] <= 7)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881555] = val_24;
            if((-1610596331) != 0)
            {
                    val_25 = -1610596331;
            }
            else
            {
                    val_25 = 0;
            }
            
            if(mem[536881491] <= 8)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881563] = val_25;
            if((-1610599221) != 0)
            {
                    val_26 = -1610599221;
            }
            else
            {
                    val_26 = 0;
            }
            
            if(mem[536881491] <= 9)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881571] = val_26;
            if((-1610596955) != 0)
            {
                    val_27 = -1610596955;
            }
            else
            {
                    val_27 = 0;
            }
            
            if(mem[536881491] <= 10)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881579] = val_27;
            if((-1610597007) != 0)
            {
                    val_28 = -1610597007;
            }
            else
            {
                    val_28 = 0;
            }
            
            if(mem[536881491] <= 11)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881587] = val_28;
            if((-1610598789) != 0)
            {
                    val_29 = -1610598789;
            }
            else
            {
                    val_29 = 0;
            }
            
            if(mem[536881491] <= 12)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881595] = val_29;
            if((-1610595705) != 0)
            {
                    val_30 = -1610595705;
            }
            else
            {
                    val_30 = 0;
            }
            
            if(mem[536881491] <= 13)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881603] = val_30;
            if((-1610595293) != 0)
            {
                    val_31 = -1610595293;
            }
            else
            {
                    val_31 = 0;
            }
            
            if(mem[536881491] <= 14)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881611] = val_31;
            if((-1610597557) != 0)
            {
                    val_32 = -1610597557;
            }
            else
            {
                    val_32 = 0;
            }
            
            if(mem[536881491] <= 15)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881619] = val_32;
            if((-1610599171) != 0)
            {
                    val_33 = -1610599171;
            }
            else
            {
                    val_33 = 0;
            }
            
            if(mem[536881491] <= 16)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881627] = val_33;
            if((-1610597337) != 0)
            {
                    val_34 = -1610597337;
            }
            else
            {
                    val_34 = 0;
            }
            
            if(mem[536881491] <= 17)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881635] = val_34;
            if((-1610600339) != 0)
            {
                    val_35 = -1610600339;
            }
            else
            {
                    val_35 = 0;
            }
            
            if(mem[536881491] <= 18)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881643] = val_35;
            if((-1610598905) != 0)
            {
                    val_36 = -1610598905;
            }
            else
            {
                    val_36 = 0;
            }
            
            if(mem[536881491] <= 19)
            {
                    throw new NullReferenceException();
            }
            
            mem[536881651] = val_36;
            val_37 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_37 = 536882909;
            }
            
            int val_1 = maxSentences - minSentences;
            val_38 = mem[536883093] + 8;
            System.Text.StringBuilder val_3 = 536893081;
            val_39 = 0;
            val_40 = (minSentences + val_38) + 1;
            val_3 = new System.Text.StringBuilder();
            if(val_40 < 1)
            {
                goto label_86;
            }
            
            int val_4 = maxWords - val_16;
            val_38 = 0;
            label_98:
            val_39 = 0;
            if(val_3.Length > length)
            {
                goto label_86;
            }
            
            val_41 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_41 = 536882909;
            }
            
            val_42 = mem[mem[536883093] + 8 + 424 + 8];
            val_42 = mem[536883093] + 8 + 424 + 8;
            int val_7 = (val_16 + 1) + (mem[536883093] + 8);
            if(val_7 < 1)
            {
                goto label_90;
            }
            
            val_40 = 0;
            label_97:
            if(val_3.Length > length)
            {
                goto label_90;
            }
            
            if(val_40 != 0)
            {
                    val_42 = 0;
                System.Text.StringBuilder val_9 = val_3.Append(value:  -1610612557);
            }
            
            val_43 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_43 = 536882909;
            }
            
            if((mem[536883093] + 8) >= mem[536881491])
            {
                    throw new NullReferenceException();
            }
            
            var val_10 = 536881467 + ((mem[536883093] + 8) << 3);
            val_16 = mem[(536881467 + (mem[536883093] + 8) << 3) + 32];
            val_16 = (536881467 + (mem[536883093] + 8) << 3) + 32;
            if(val_40 == 0)
            {
                    val_16 = Crosstales.ExtensionMethods.CTToTitleCase(str:  val_16);
            }
            
            System.Text.StringBuilder val_12 = val_3.Append(value:  val_16);
            val_40 = val_40 + 1;
            if(val_7 != val_40)
            {
                goto label_97;
            }
            
            label_90:
            val_39 = -1610611495;
            System.Text.StringBuilder val_13 = val_3.Append(value:  val_39);
            val_38 = val_38 + 1;
            if(val_38 != val_40)
            {
                goto label_98;
            }
            
            label_86:
            if(val_38 < val_40)
            {
                    return (string)val_3;
            }
            
            if(mem[536893097] <= length)
            {
                    return (string)val_3;
            }
            
            return val_3.Substring(startIndex:  0, length:  length - 1)(val_3.Substring(startIndex:  0, length:  length - 1)) + -1610611497(-1610611497);
        }
        public static string LanguageToISO639(UnityEngine.SystemLanguage language)
        {
            var val_1;
            if(language <= 41)
            {
                    val_1 = mem[26159144 + (language) << 3];
                val_1 = 26159144 + (language) << 3;
                return (string)val_1;
            }
            
            val_1 = 27533264;
            return (string)val_1;
        }
        public static UnityEngine.SystemLanguage ISO639ToLanguage(string isoCode)
        {
            var val_45;
            if(((System.String.IsNullOrEmpty(value:  isoCode)) == true) || (isoCode._stringLength < 2))
            {
                goto label_137;
            }
            
            string val_3 = isoCode.Substring(startIndex:  0, length:  2).ToLower();
            uint val_4 = _PrivateImplementationDetails_.ComputeStringHash(s:  val_3);
            if(val_4 > 1213488160)
            {
                goto label_5;
            }
            
            if(val_4 > 1111292255)
            {
                goto label_6;
            }
            
            if(val_4 > 1045564875)
            {
                goto label_7;
            }
            
            if(val_4 > 942383232)
            {
                goto label_8;
            }
            
            if(val_4 == 926444256)
            {
                goto label_9;
            }
            
            if((val_4 != 942383232) || ((System.String.op_Equality(a:  val_3, b:  -1610600133)) == false))
            {
                goto label_137;
            }
            
            val_45 = 3;
            return 10;
            label_5:
            if(val_4 > 1545789136)
            {
                goto label_13;
            }
            
            if(val_4 > 1461901041)
            {
                goto label_14;
            }
            
            if(val_4 > 1230118684)
            {
                goto label_15;
            }
            
            if(val_4 == 1227161470)
            {
                goto label_16;
            }
            
            if((val_4 != 1230118684) || ((System.String.op_Equality(a:  val_3, b:  -1610595933)) == false))
            {
                goto label_137;
            }
            
            val_45 = 35;
            return 10;
            label_6:
            if(val_4 > 1177122803)
            {
                goto label_20;
            }
            
            if(val_4 > 1162757945)
            {
                goto label_21;
            }
            
            if(val_4 == 1129452970)
            {
                goto label_22;
            }
            
            if((val_4 != 1162757945) || ((System.String.op_Equality(a:  val_3, b:  -1610596693)) == false))
            {
                goto label_137;
            }
            
            val_45 = 27;
            return 10;
            label_13:
            if(val_4 > 1581462945)
            {
                goto label_26;
            }
            
            if(val_4 > 1562713850)
            {
                goto label_27;
            }
            
            if(val_4 == 1547363254)
            {
                goto label_28;
            }
            
            if((val_4 != 1562713850) || ((System.String.op_Equality(a:  val_3, b:  -1610600277)) == false))
            {
                goto label_137;
            }
            
            val_45 = 1;
            return 10;
            label_7:
            if(val_4 > 1062342494)
            {
                goto label_32;
            }
            
            if(val_4 == 1058693732)
            {
                goto label_33;
            }
            
            if((val_4 != 1062342494) || ((System.String.op_Equality(a:  val_3, b:  -1610596247)) == false))
            {
                goto label_137;
            }
            
            val_45 = 31;
            return 10;
            label_14:
            if(val_4 > 1479119945)
            {
                goto label_37;
            }
            
            if(val_4 == 1478281302)
            {
                goto label_38;
            }
            
            if((val_4 != 1479119945) || ((System.String.op_Equality(a:  val_3, b:  -1610599961)) == false))
            {
                goto label_137;
            }
            
            val_45 = 5;
            return 10;
            label_20:
            if(val_4 > 1194886160)
            {
                goto label_42;
            }
            
            if(val_4 == 1192914684)
            {
                goto label_43;
            }
            
            if((val_4 != 1194886160) || ((System.String.op_Equality(a:  val_3, b:  -1610597755)) == false))
            {
                goto label_137;
            }
            
            val_45 = 21;
            return 10;
            label_26:
            if(val_4 > 1646454850)
            {
                goto label_47;
            }
            
            if(val_4 == 1630957159)
            {
                goto label_48;
            }
            
            if((val_4 != 1646454850) || ((System.String.op_Equality(a:  val_3, b:  -1610598633)) == false))
            {
                goto label_137;
            }
            
            val_45 = 12;
            return 10;
            label_8:
            if(val_4 == 975938470)
            {
                goto label_52;
            }
            
            if(val_4 == 1011465184)
            {
                goto label_53;
            }
            
            if((val_4 != 1045564875) || ((System.String.op_Equality(a:  val_3, b:  -1610596155)) == false))
            {
                goto label_137;
            }
            
            val_45 = 32;
            return 10;
            label_15:
            if(val_4 == 1278921350)
            {
                goto label_57;
            }
            
            if(val_4 == 1312329493)
            {
                goto label_58;
            }
            
            if((val_4 != 1461901041) || ((System.String.op_Equality(a:  val_3, b:  -1610598589)) == false))
            {
                goto label_137;
            }
            
            val_45 = 14;
            return 10;
            label_21:
            if(val_4 == 1164435231)
            {
                goto label_62;
            }
            
            if(val_4 == 1176137065)
            {
                goto label_63;
            }
            
            if((val_4 != 1177122803) || ((System.String.op_Equality(a:  val_3, b:  -1610599517)) == false))
            {
                goto label_137;
            }
            
            val_45 = 7;
            return 10;
            label_27:
            if(val_4 == 1563552493)
            {
                goto label_67;
            }
            
            if(val_4 == 1565420801)
            {
                goto label_68;
            }
            
            if((val_4 != 1581462945) || ((System.String.op_Equality(a:  val_3, b:  -1610595537)) == false))
            {
                goto label_137;
            }
            
            val_45 = 38;
            return 10;
            label_32:
            if(val_4 == 1092248970)
            {
                goto label_72;
            }
            
            if(val_4 == 1095059089)
            {
                goto label_73;
            }
            
            if((val_4 != 1111292255) || ((System.String.op_Equality(a:  val_3, b:  -1610597613)) == false))
            {
                goto label_137;
            }
            
            val_45 = 23;
            return 10;
            label_37:
            if(val_4 == 1529997255)
            {
                goto label_77;
            }
            
            if(val_4 == 1545391778)
            {
                goto label_78;
            }
            
            if((val_4 != 1545789136) || ((System.String.op_Equality(a:  val_3, b:  -1610598723)) == false))
            {
                goto label_137;
            }
            
            val_45 = 13;
            return 10;
            label_42:
            if(val_4 == 1195724803)
            {
                goto label_82;
            }
            
            if(val_4 == 1209692303)
            {
                goto label_83;
            }
            
            if((val_4 != 1213488160) || ((System.String.op_Equality(a:  val_3, b:  -1610596427)) == false))
            {
                goto label_137;
            }
            
            val_45 = 30;
            return 10;
            label_47:
            if(val_4 == 1647734778)
            {
                goto label_87;
            }
            
            if(val_4 == 1649706254)
            {
                goto label_88;
            }
            
            if((val_4 != 1816099348) || ((System.String.op_Equality(a:  val_3, b:  -1610597725)) == false))
            {
                goto label_137;
            }
            
            val_45 = 22;
            return 10;
            label_9:
            if((System.String.op_Equality(a:  val_3, b:  -1610598069)) == false)
            {
                goto label_137;
            }
            
            val_45 = 20;
            return 10;
            label_16:
            if((System.String.op_Equality(a:  val_3, b:  -1610600355)) == false)
            {
                goto label_137;
            }
            
            val_45 = 0;
            return 10;
            label_22:
            if((System.String.op_Equality(a:  val_3, b:  -1610596145)) == false)
            {
                goto label_137;
            }
            
            val_45 = 33;
            return 10;
            label_28:
            if((System.String.op_Equality(a:  val_3, b:  -1610598329)) == false)
            {
                goto label_137;
            }
            
            val_45 = 17;
            return 10;
            label_33:
            if((System.String.op_Equality(a:  val_3, b:  -1610599011)) == false)
            {
                goto label_137;
            }
            
            val_45 = 16;
            return 10;
            label_38:
            if((System.String.op_Equality(a:  val_3, b:  -1610599381)) == false)
            {
                goto label_137;
            }
            
            val_45 = 8;
            return 10;
            label_43:
            if((System.String.op_Equality(a:  val_3, b:  -1610598861)) == false)
            {
                goto label_137;
            }
            
            val_45 = 11;
            return 10;
            label_48:
            if((System.String.op_Equality(a:  val_3, b:  -1610596999)) == false)
            {
                goto label_137;
            }
            
            val_45 = 9;
            return 10;
            label_52:
            if((System.String.op_Equality(a:  val_3, b:  -1610600123)) == false)
            {
                goto label_137;
            }
            
            val_45 = 4;
            return 10;
            label_53:
            if((System.String.op_Equality(a:  val_3, b:  -1610595203)) == false)
            {
                goto label_137;
            }
            
            val_45 = 39;
            return 10;
            label_57:
            if((System.String.op_Equality(a:  val_3, b:  -1610598113)) == false)
            {
                goto label_137;
            }
            
            val_45 = 18;
            return 10;
            label_58:
            if((System.String.op_Equality(a:  val_3, b:  -1610597863)) == false)
            {
                goto label_137;
            }
            
            val_45 = 19;
            return 10;
            label_62:
            if((System.String.op_Equality(a:  val_3, b:  -1610594849)) == false)
            {
                goto label_137;
            }
            
            val_45 = 6;
            return 10;
            label_63:
            if((System.String.op_Equality(a:  val_3, b:  -1610598903)) == false)
            {
                goto label_137;
            }
            
            val_45 = 34;
            return 10;
            label_67:
            if((System.String.op_Equality(a:  val_3, b:  -1610597377)) == false)
            {
                goto label_137;
            }
            
            val_45 = 25;
            return 10;
            label_68:
            if((System.String.op_Equality(a:  val_3, b:  -1610596627)) == false)
            {
                goto label_137;
            }
            
            val_45 = 28;
            return 10;
            label_72:
            bool val_37 = System.String.op_Equality(a:  val_3, b:  -1610598989);
            goto label_137;
            label_73:
            if((System.String.op_Equality(a:  val_3, b:  -1610595735)) == false)
            {
                goto label_137;
            }
            
            val_45 = 36;
            return 10;
            label_77:
            if((System.String.op_Equality(a:  val_3, b:  -1610597373)) == false)
            {
                goto label_137;
            }
            
            val_45 = 24;
            return 10;
            label_78:
            if((System.String.op_Equality(a:  val_3, b:  -1610599301)) == false)
            {
                goto label_137;
            }
            
            val_45 = 15;
            return 10;
            label_82:
            if((System.String.op_Equality(a:  val_3, b:  -1610595653)) == false)
            {
                goto label_137;
            }
            
            val_45 = 37;
            return 10;
            label_83:
            if((System.String.op_Equality(a:  val_3, b:  -1610598799)) == false)
            {
                goto label_137;
            }
            
            val_45 = 2;
            return 10;
            label_87:
            if((System.String.op_Equality(a:  val_3, b:  -1610596983)) == false)
            {
                goto label_137;
            }
            
            val_45 = 26;
            return 10;
            label_88:
            if((System.String.op_Equality(a:  val_3, b:  -1610596447)) != false)
            {
                    val_45 = 29;
                return 10;
            }
            
            label_137:
            val_45 = 10;
            return 10;
        }
        public static object InvokeMethod(string className, string methodName, object[] parameters)
        {
            Unknown val_18;
            string val_19;
            System.Collections.Generic.IEnumerable<Unknown> val_20;
            var val_21;
            var val_22;
            var val_23;
            System.Func<Unknown, System.Collections.Generic.IEnumerable<Unknown>> val_24;
            var val_25;
            var val_26;
            var val_27;
            var val_28;
            object val_29;
            var val_30;
            var val_31;
            var val_33;
            val_18 = parameters;
            val_19 = methodName;
            val_20 = 27345240;
            if((System.String.IsNullOrEmpty(value:  className)) == false)
            {
                goto label_1;
            }
            
            val_21 = 27481432;
            if(mem[536885163] != 0)
            {
                goto label_5;
            }
            
            label_6:
            label_5:
            UnityEngine.Debug.LogWarning(message:  -1610611959);
            val_22 = 0;
            return (object)(12 == 10) ? 0 : 0;
            label_1:
            if((System.String.IsNullOrEmpty(value:  val_19)) == false)
            {
                goto label_4;
            }
            
            if(mem[536885163] != 0)
            {
                goto label_5;
            }
            
            goto label_6;
            label_4:
            System.AppDomain val_3 = System.AppDomain.CurrentDomain;
            if(val_3 == null)
            {
                    throw new NullReferenceException();
            }
            
            val_23 = 536897641;
            val_20 = val_3.GetAssemblies();
            if(mem[536897865] == 0)
            {
                    val_23 = 536897641;
            }
            
            val_24 = mem[mem[536897825] + 8];
            val_24 = mem[536897825] + 8;
            if(val_24 == 0)
            {
                    if(mem[536897865] == 0)
            {
                    val_23 = 536897641;
            }
            
                System.Func<System.Object, System.Object> val_5 = 536903111;
                if(val_5 == 0)
            {
                    throw new NullReferenceException();
            }
            
                val_24 = val_5;
                val_5 = new System.Func<System.Object, System.Object>(object:  mem[536897825], method:  1610683537);
                mem2[0] = val_24;
            }
            
            System.Collections.Generic.IEnumerable<Unknown> val_6 = System.Linq.Enumerable.SelectMany<System.Object, System.Object>(source:  val_20, selector:  val_24);
            if(val_6 == null)
            {
                    throw new NullReferenceException();
            }
            
            val_25 = val_6;
            val_26 = val_6;
            label_44:
            val_27 = val_26;
            if((val_26 & 1) == 0)
            {
                goto label_22;
            }
            
            val_28 = val_26;
            val_29 = val_26;
            if(val_26 == null)
            {
                    throw new NullReferenceException();
            }
            
            if(((val_29 == null) || ((val_29.Equals(value:  className)) == false)) || (val_29.IsClass == false))
            {
                goto label_44;
            }
            
            System.Reflection.MethodInfo val_12 = val_29.GetMethod(name:  val_19, bindingAttr:  24);
            if(val_12 == null)
            {
                    throw new NullReferenceException();
            }
            
            object val_13 = val_12.Invoke(obj:  0, parameters:  val_18);
            goto label_32;
            label_22:
            val_18 = 0;
            val_19 = 12;
            if(val_26 == null)
            {
                goto label_61;
            }
            
            label_60:
            val_31 = val_26;
            label_61:
            if(val_18 != 0)
            {
                goto label_58;
            }
            
            return (object)(12 == 10) ? 0 : 0;
            label_32:
            if(val_26 != null)
            {
                goto label_60;
            }
            
            goto label_61;
            label_58:
            val_30 = ;
            if(val_30 != 1)
            {
                goto label_59;
            }
            
            if(val_20 != 0)
            {
                goto label_60;
            }
            
            goto label_61;
            label_59:
            if(val_20 == 0)
            {
                goto label_69;
            }
            
            label_68:
            var val_19 = 536884939;
            var val_18 = mem[536885237];
            if(val_18 == 0)
            {
                goto label_63;
            }
            
            var val_17 = mem[536885115];
            val_17 = val_17 + 8;
            label_65:
            if(((mem[536885115] + 8) + -8) == X28)
            {
                goto label_64;
            }
            
            val_18 = val_18 - 1;
            val_17 = val_17 + 16;
            if(((mem[536885115] + 8) + -8) != X28)
            {
                goto label_65;
            }
            
            label_63:
            val_33 = val_20;
            goto label_66;
            label_64:
            val_19 = val_19 + (((mem[536885115] + 8)) << 4);
            val_33 = val_19 + 312;
            label_66:
            label_69:
            if(val_20 != 0)
            {
                goto label_68;
            }
            
            goto label_69;
        }
        public static string GetArgument(string name)
        {
            var val_4;
            string val_5;
            var val_6;
            val_5 = 0;
            if((System.String.IsNullOrEmpty(value:  name)) == true)
            {
                    return val_5;
            }
            
            Unknown val_5 = val_2.Length;
            val_4 = Crosstales.Common.Util.BaseHelper.GetArguments();
            if(val_5 < 1)
            {
                goto label_4;
            }
            
            val_5 = val_5 & 4294967295;
            label_10:
            if(0 >= val_5)
            {
                    throw new NullReferenceException();
            }
            
            if((Crosstales.ExtensionMethods.CTEquals(str:  name, toCheck:  val_4[0], comp:  5)) == false)
            {
                goto label_7;
            }
            
            val_6 = 0 + 1;
            if(val_6 >= val_2.Length)
            {
                goto label_8;
            }
            
            goto label_9;
            label_7:
            val_6 = 0 + 1;
            label_8:
            if(val_6 < (val_2.Length << ))
            {
                goto label_10;
            }
            
            label_4:
            val_5 = 0;
            return val_5;
            label_9:
            if(val_6 >= val_2.Length)
            {
                    throw new NullReferenceException();
            }
            
            val_5 = val_4[(val_6 << 32) >> 29];
            return val_5;
        }
        public static string[] GetArguments()
        {
            var val_2;
            var val_3;
            val_2 = 536882909;
            if(mem[536883133] == 0)
            {
                    val_2 = 536882909;
            }
            
            if((mem[536883093] + 24) == 0)
            {
                    val_3 = 536882909;
                if(mem[536883133] == 0)
            {
                    val_3 = 536882909;
            }
            
                mem2[0] = System.Environment.GetCommandLineArgs();
                val_2 = 536882909;
            }
            
            if(mem[536883133] != 0)
            {
                    return (Unknown)mem[536883093] + 24;
            }
            
            val_2 = 536882909;
            return (Unknown)mem[536883093] + 24;
        }
        private static string addLeadingZero(int value)
        {
            string val_3 = value.ToString();
            if(value > 9)
            {
                    return (string)val_3;
            }
            
            val_3 = -1610611407(-1610611407) + val_3;
            return (string)val_3;
        }
        protected BaseHelper()
        {
        
        }
    
    }

}
